package com.queming.core.mapper;

import com.queming.core.dto.BaseDto;
import com.queming.core.entity.AbstractEntity;
import org.mapstruct.MappingTarget;

/**
 *
 * @author 陈词调
 * @date 2022/5/7
 */
public interface MapperInterface<Entity extends AbstractEntity,Dto extends BaseDto> {
    Dto toDto(Entity entity);

    Entity toEntity(Dto dto);

    Entity updateEntity(@MappingTarget Entity entity,Dto dto);
}
